<!DOCTYPE html>
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>发布交易信息 - {$settings.site.sitename}</title>
    <meta name="keywords" content="{$settings.site.seo_keywords}" />
    <meta name="description" content="{$settings.site.seo_description}" />
	{include file="public/css"}
    {include file="public/js"}
<style>
.banner-title{font-size:38px;line-height:150px;text-align:center;}
</style>
</head>
<body class="layui-bg-gray">
{include file="public/header"}
<div class="layui-container">
<div class="layui-main trade-add">
<div class="layui-row layui-col-space10">

    <div class="trade-add-left">

      	<fieldset class="layui-elem-field layui-field-title">
		  <legend>发布交易信息</legend>
		  <div class="layui-field-box">
		    
				<form class="layui-form" action="post" >
          <div class="layui-form-item">
            <label class="layui-form-label">交易分类</label>
                
            <div class="layui-input-inline" style="width:600px" > 
              {:get_cate('guarantee_category')}
            </div>
          </div>
				  <div class="layui-form-item">
				    <label class="layui-form-label">交易标题</label>
				        
				    <div class="layui-input-inline" style="width:350px" > 
				      <input type="text" name="title" lay-verify="title" maxlength="25" autocomplete="off" placeholder="请输入信息标题，最多25个字" class="layui-input" value="{$Request.param.title}">
				    </div>
				  </div>

				  <div class="layui-form-item">
				    <label class="layui-form-label">我的身份</label>
				    <div class="layui-input-inline">
				      <input type="radio" name="id_type" value="0" {if $Request.param.id_type ==0 } checked {/if}  title="买家">
				      <input type="radio" name="id_type" value="1" {if $Request.param.id_type ==1 } checked {/if}  title="卖家" >
				    </div>
				  </div>

	
					  <div class="layui-form-item">
				    <label class="layui-form-label">预期价格</label>
				    <div class="layui-input-inline">
				      <input type="text" name="price" id="price" maxlength="13" lay-verify="price" autocomplete="off" placeholder="请输入您预期的价格" class="layui-input"  maxlength="13" value="{$Request.param.price}">
				    </div>
				  </div>	  
				  <div class="layui-form-item">
				    <label class="layui-form-label">中介费</label>
				    <div class="layui-input-inline" style="width:450px;">
				   <input type="radio" name="fee_type" lay-filter="fee_type" value="1" title="买家全付 " checked>
                   <input type="radio" name="fee_type" lay-filter="fee_type" value="2"  title="卖家全付 ">
                   <input type="radio" name="fee_type" lay-filter="fee_type" value="3" title="双方各付一半" >
				    </div>
				  </div>

		

			      <div class="layui-form-item">
				    <label class="layui-form-label">交易内容</label>
				    <div class="layui-input-block">
				     {form:ueditor name="content" /}
				    </div>
				  </div>
			      <div class="layui-form-item">
				    
				    <div class="layui-input-block" style="text-align:right">
				        <button class="layui-btn layui-btn-normal" style="width:100px;" lay-submit="" lay-filter="form" data-url="{:url('trade/publish')}">立即发布</button>
				    </div>
				  </div>

				</form>

		  </div>
		</fieldset>
    </div>
    <div class="trade-add-right">
      <div class="layui-card">
		    <div class="layui-card-header">中介客服</div>
		    <div class="layui-card-body">
		      客服电话：{$settings.site.telphone}<br>
		      客服QQ：{$settings.site.qq}
		    </div>
		 </div>
    <div class="layui-card">
  		  <div class="layui-card-header">手续费</div>
  		  <div class="layui-card-body">
  		     中介担保平台仅收取{$settings.guarantee.fee_ratio}% 手续费
  		  </div>
  	</div>
</div>

</div>

</div>
</div>


{include file="public/footer"}
<script>
layui.use(['layer','form','layedit'], function(){
  var form = layui.form;
  var layer = layui.layer;
  var layedit = layui.layedit
  
  //监听提交
  form.on('submit(form)', function(data){
  var url = $(this).attr('data-url');
  if(url ==''){
    layer.msg('请求的url不存在');
  }
    $.post(url,data.field,function(json){
      if(json.code == '0'){

	  qilecms.success(json.msg);
	      setTimeout(function(){
			location.href="{:url('@user/guarantee/info')}";
		  },1000);
      }else{
      	qilecms.error(json.msg);
      }
    });
   

    return false;

  });

















});
</script>

</body>
</html>